﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ResxCrunch
{
    /// <summary>
    /// Error form class
    /// </summary>
    public partial class FrmError : Form
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="FrmError"/> class.
        /// </summary>
        public FrmError()
        {
            InitializeComponent();
        }

        /// <summary>
        /// Gets or sets the message.
        /// </summary>
        /// <value>The message.</value>
        public string Message { get; set; }

        /// <summary>
        /// Handles the Load event of the FrmError control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void FrmError_Load(object sender, EventArgs e)
        {
            txtErrorDetails.Text = this.Message;
        }

        /// <summary>
        /// Handles the Click event of the btnRestart control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void btnRestart_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.OK;
            this.Close();
        }
    }
}
